<?php
/**
 * Created by PhpStorm.
 * User: duowang.wangduo
 * Date: 14-4-19
 * Time: 下午7:39
 */

class Group extends CI_Controller{
    public function __construct(){
        parent::__construct();
        $this->load->model('group_model');
    }
    function index(){
        echo APPPATH;
        $groups = $this->group_model->get_groups();
        print_r($groups);
    }
    public function add(){
        $post_params = $this->input->post();
        $group = array(
            'product_name' => $post_params['name'],
            'product_type' => $post_params['type'],
            'url' => $post_params['url']
        );
        $result = $this->group_model->add($group);
    }
    public function delete(){

    }
    public function getById(){

    }
    public function update(){

    }
} 